<template>
  <div>
    <div class="flex items-center justify-center">
      <span class=""> <i class="mdi mdi-cog"></i>简单的设置页面 </span>
      <el-button class="ml-1" @click="back">返回</el-button>
    </div>
    <div class="w-[30%] mt-2 mx-auto">
      <el-input v-model="name">
        <template #prepend>设置你的名字</template>
      </el-input>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useGlobalStore } from '../stores';

const router = useRouter();

const store = useGlobalStore();
const name = computed({
  get: () => store.name,
  set: v => {
    store.name = v;
  },
});
const back = () => {
  router.push('/main');
};
</script>

<style scoped></style>
